# Maintainer: Thiago Perrotta <tbperrotta@gmail.com>
pkgname=yamlfmt
pkgver=0.12.1
pkgrel=1
pkgdesc="An extensible command line tool or library to format yaml files"
url="https://github.com/google/yamlfmt"
arch="all"
license="Apache-2.0"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/yamlfmt/archive/refs/tags/v$pkgver.tar.gz"
options="!check net"

build() {
	go build -o yamlfmt ./cmd/yamlfmt
}

package() {
	install -Dm755 yamlfmt "$pkgdir/usr/bin/yamlfmt"
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

sha512sums="
ac39234977d11751802a3a8c2e2140c16e408f987d29aa4ac8e7dd329067c1cef686b0950fa4e4478aeeb214506e7d3fe498734e584abcbc4f3aa48f9f1c7504  yamlfmt-0.12.1.tar.gz
"
